package com.cn.wanxi.exception;

import com.cn.wanxi.Result.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class MyException {

    @ExceptionHandler
    public Result exception(Exception ex){
        return Result.getInstance(ex.getMessage());
    }
}
